<?php
/**
 * Created by PhpStorm.
 * User: HelloWorld
 * Date: 2019/09/26
 */
use wkhtmltox\PDF\Converter as PDFConverter;
use wkhtmltox\PDF\Object as PDFObject;

class Func_MakePdf_Wkhtmltox{
    //生成pdf
    public static function make($tpl,$path){
        $converter = new PDFConverter([
            "out" => $path
        ]);
        $PDFObject = new PDFObject($tpl);
        $converter->add($PDFObject);
        $converter->convert();
        unset($PDFObject);
        unset($PDFObject);
    }
}